import { get, post, put, deleteApi, deleteOne } from '@/utils/api'

export function pageQuery(queryParams) {
    return get('/admin/specs/page', queryParams)
}

export function insert(data) {
    return post('/admin/specs', data)
}

export function update(data) {
    return put('/admin/specs', data)
}

export function deleteData(ids) {
    return deleteApi('/admin/specs', ids)
}

export function specificationOptions() {
    return get('/admin/specs/options')
}

export function specificationEffectiveOptions() {
    return get('/admin/specs/effective/options')
}

export function specificationEffectiveOptionsByType(typeId) {
    return get(`/admin/specs/effective/options/${typeId}`)
}

export function specificationEffectiveOptionsByGoods(goodsId) {
    return get(`/admin/specs/store/effective/options/${goodsId}`)
}